package com.neu.envprotection.admin.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.neu.envprotection.admin.dao.entity.User;
import com.neu.envprotection.admin.dto.req.GetGridManReqTto;
import com.neu.envprotection.admin.dto.req.GetSupervisorReqDto;
import com.neu.envprotection.admin.dto.resp.GetGridManRespDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @date 2024/06/07
 */

public interface UserMapper extends BaseMapper<User> {

    List<User> searchUsers(Page<User> page, GetSupervisorReqDto dto);

    List<GetGridManRespDto> searchGrids(Page<User> page, GetGridManReqTto dto);

    @Select("select name from user where id = #{supervisorId}")
    String selectName(Integer supervisorId);
}
